<template>
  <view>
    <h1>父组件</h1>
    <Son :name="name" :count="count" @add="add1" />
    <hr />
    <h1>遍历子组件</h1>
    <!-- <block  v-for="(item,index) in list" :key="{index}">
			<Son :item="item" />
		</block> -->
  </view>
</template>

<script setup lang="ts">
import { ref, reactive } from 'vue'

let name = ref('张三')
let list = reactive([
  { name: '张三', age: 18 },
  { name: '李四', age: 20 },
  { name: '王五', age: 22 },
])
let count = ref(0)

const add1 = () => {
  count.value++
}
</script>

<style lang="scss"></style>
